package com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.controller;

import java.util.Map;

import com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.dto.AsphaltDataRatioDto;
import com.qzsoft.zhjd.asphalt.modules.asphaltdataratio.service.AsphaltDataRatioService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qzsoft.jeemis.common.utils.Result;
import com.qzsoft.zhjd.common.utils.ResultUtils;

@RestController
@RequestMapping("/api/asphaltDataRatio")
public class AsphaltDataRatioController {

    @Autowired
    private AsphaltDataRatioService asphaltDataRatioService;

    /**
     * @Title withinRatioPage
     * @Description 内掺配比数据分页
     * @param params 查询条件
     * @return 内掺配比数据分页s
     */
    @RequiresPermissions("api:asphaltData:productmoninter")
    @GetMapping("/withinRatioPage")
    public Result<IPage<AsphaltDataRatioDto>> withinRatioPage(@RequestParam Map<String, Object> params){
        IPage<AsphaltDataRatioDto> page = asphaltDataRatioService.withinRatioPage(params);
        return ResultUtils.ok(page);
    }

    /**
     * @Title outsideRatioPage
     * @Description 外掺配比数据分页
     * @param params 查询条件
     * @return 内掺配比数据分页s
     */
    @RequiresPermissions("api:asphaltData:productmoninter")
    @GetMapping("/outsideRatioPage")
    public Result<IPage<AsphaltDataRatioDto>> outsideRatioPage(@RequestParam Map<String, Object> params){
        IPage<AsphaltDataRatioDto> page = asphaltDataRatioService.outsideRatioPage(params);
        return ResultUtils.ok(page);
    }

}
